home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 126-150 / scopedisk146 / liner / rexx / countword.rx < prev   
Text File  |  1995-03-19  |  534b  |  23 lines

  1. /*Finds out how many times a word appears in the current outline*/
  2.  
  3. address 'liner'
  4.  
  5. say "Please type in the word you want to search for."
  6. parse pull SearchString
  7.  
  8. say "The word is " || SearchString
  9.  
  10. options results
  11. Counter = 0
  12.  
  13. 'totop'  /*Go to the top of the outline*/
  14. do until result = 'false'  /*Loop until the word isn't found*/
  15.    'search ftt ' || SearchString  /*Do the search*/
  16.    Counter=Counter+1              /*Increment the counter*/
  17. end
  18.  
  19.       /*Print the results*/
  20. echo "The word was found " || Counter-1 || " times."
  21.  
  22.  
  23.